[EWS][500][Exchange2007] Export Item Return exception " The remote server returned an error: (500) Internal Server Error."

Hi

I export a mail from exchange 2007(version 8.3) by EWSEditor1.10.0.34502, but it pop a exception :

Exception details:
Message: The remote server returned an error: (500) Internal Server Error.
Type: System.Net.WebException
Source: System
Stack Trace:
   at System.Net.HttpWebRequest.GetResponse()
   at EWSEditor.Exchange.ExportUploadHelper.ExportItemPost(String ServerVersion, String sItemId, String sFile) in c:\Users\administrator.EX07HBBU\Desktop\EWSEditor 1.10 - code\EWSEditor\Exchange\ExportUploadHelper.cs:line 125
   at EWSEditor.Forms.ItemsContentForm.MnuExportToStream_Click(Object sender, EventArgs e) in c:\Users\administrator.EX07HBBU\Desktop\EWSEditor 1.10 - code\EWSEditor\Forms\ItemsContentForm.cs:line 595
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

And the export item request xml is:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
      xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2007_SP1"/>
  </soap:Header>
  <soap:Body>
    <m:ExportItems>
      <m:ItemIds>
        <t:ItemId Id="AAMkAGM5ZDcwMTFmLTU5MDItNGMyMS1iNWUyLTFlOGZmODAzYTgxNQBGAAAAAACBrpeJCEvYTqyaT++BC2OKBwDBnJr2Owd/Q4lHnMbiUhr8AG7iBnqAAADBnJr2Owd/Q4lHnMbiUhr8AIFctnGjAAA="/>
      </m:ItemIds>
    </m:ExportItems>
  </soap:Body>
</soap:Envelope>

I check the IIS log files, and there are some information(please see the last red line):

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2015-05-12 21:53:00
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2015-05-12 21:53:00 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 109
2015-05-12 21:53:02 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetItem;Version=1;RpcC=9;RpcL=62;LdapC=7;LdapL=16; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 156
2015-05-12 21:53:21 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 - 401 2 5 93
2015-05-12 21:53:21 155.35.123.133 POST /EWS/Exchange.asmx - 443 EX07HBBU\test02 155.35.79.197 - 500 0 0 156
2015-05-12 21:59:54 155.35.123.133 POST /Autodiscover/Autodiscover.xml - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 78
2015-05-12 21:59:55 155.35.123.133 POST /Autodiscover/Autodiscover.xml - 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 187
2015-05-12 21:59:55 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 21:59:55 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=ConvertId;Version=1;LdapC=3;LdapL=16; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 171
2015-05-12 21:59:58 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 93
2015-05-12 21:59:58 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetFolder;Version=1;RpcC=7;RpcL=15;LdapC=1;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 218
2015-05-12 22:00:00 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 22:00:00 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetFolder;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 156
2015-05-12 22:00:01 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 22:00:01 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=FindFolder;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 171
2015-05-12 22:00:03 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 15
2015-05-12 22:00:03 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetFolder;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 93
2015-05-12 22:00:03 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 22:00:04 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=FindFolder;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 15
2015-05-12 22:00:07 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 171
2015-05-12 22:00:07 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetFolder;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 202
2015-05-12 22:00:07 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 22:00:08 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=FindItem;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 93
2015-05-12 22:00:14 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 109
2015-05-12 22:00:14 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetItem;Version=1;RpcC=6;RpcL=0;LdapC=5;LdapL=16; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 156
2015-05-12 22:00:17 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 46
2015-05-12 22:00:17 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetItem;Version=1;RpcC=6;RpcL=15;LdapC=5;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 327
2015-05-12 22:00:40 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 22:00:40 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=CopyItem;Version=1;RpcC=11;RpcL=15;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 156
2015-05-12 22:00:40 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 15
2015-05-12 22:00:40 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=FindItem;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 202
2015-05-12 22:00:46 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 202
2015-05-12 22:00:46 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetItem;Version=1;RpcC=6;RpcL=0;LdapC=5;LdapL=15; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 405
2015-05-12 22:00:57 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 46
2015-05-12 22:00:57 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetFolder;Version=1;RpcC=6;RpcL=0;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 202
2015-05-12 22:00:57 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 78
2015-05-12 22:00:58 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=FindItem;Version=1;RpcC=6;RpcL=46;LdapC=0;LdapL=0; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 124
2015-05-12 22:01:01 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 156
2015-05-12 22:01:01 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetItem;Version=1;RpcC=6;RpcL=0;LdapC=5;LdapL=16; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 140
2015-05-12 22:01:13 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 401 2 5 171
2015-05-12 22:01:13 155.35.123.133 POST /EWS/Exchange.asmx SoapAction=GetItem;Version=1;RpcC=6;RpcL=0;LdapC=5;LdapL=15; 443 EX07HBBU\test02 155.35.79.197 EWSEditor+(ExchangeServicesClient/15.00.0913.015) 200 0 0 202
2015-05-12 22:02:59 155.35.123.133 POST /EWS/Exchange.asmx - 443 - 155.35.79.197 - 401 2 5 93
2015-05-12 22:02:59 155.35.123.133 POST /EWS/Exchange.asmx - 443 EX07HBBU\test02 155.35.79.197 - 500 0 0 62

Did anyone else meet this problem before? How can I find some useful information (such as log, debug) to resolve the problem?

Is caused by Unauthorized from the 401 error(from the penultimate log)?

Thanks,

Haiyang.




  • Edited by Haiyang_It Wednesday, May 13, 2015 1:42 AM
May 12th, 2015 2:50pm

The ExportItems operation was added in Exchange 2010 SP1 so if this is a Exchange 2007 server then that operation won't work it will only work on Exchange 2010 SP1 or greater see https://msdn.microsoft.com/en-us/library/office/dn741586%28v=exchg.150%29.aspx . (You should be able to use MIME export option still in the EWS Editor)

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
May 13th, 2015 4:05am

The ExportItems operation was added in Exchange 2010 SP1 so if this is a Exchange 2007 server then that operation won't work it will only work on Exchange 2010 SP1 or greater see https://msdn.microsoft.com/en-us/library/office/dn741586%28v=exchg.150%29.aspx . (You should be able to use MIME export option still in the EWS Editor)

Cheers
Glen

  • Marked as answer by Haiyang_It Thursday, May 14, 2015 7:01 AM
May 13th, 2015 4:05am

Hi Glen,

Thanks for your reply.

I found the information from https://msdn.microsoft.com/EN-US/library/office/bb409286(v=exchg.150).aspx#bk_bulk_transfer, Bulk transfer operation is introduced in Exchange 2010 SP1.

Thanks,

Haiyang.

Free Windows Admin Tool Kit Click here and download it now
May 14th, 2015 3:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics